package subject_set.offer100;

import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;

/**
 * @author haomin
 * @date 2022/10/13 20:09
 **/
public class Offer05 {
    class Solution {
        public String replaceSpace(String s) {
            StringBuffer sb = new StringBuffer();
            for(int i = 0; i < s.length(); ++i){
                char c = s.charAt(i);
                if(c == ' '){
                    sb.append("%20");
                }else sb.append(c);
            }
            return sb.toString();
        }
    }

    public static void main(String[] args) {
        List<Integer> list = new ArrayList<>();
        list.add(123);
        Iterator<Integer> iterator = list.iterator();
        System.out.println(iterator.next());
    }
}